package cn.tx.service.Impl;

import cn.tx.dao.CourseDao;
import cn.tx.model.Course;
import cn.tx.service.CourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class CourseServiceImpl implements CourseService {

    @Autowired
    private CourseDao CourseDao;

    @Override
    public Course findByUserName(String username) {
        return CourseDao.findByUserName(username);
    }

    @Override
    public int addCourse(Course Course) {
        return CourseDao.addCourse(Course);
    }

    @Override
    public List<Course> findList(Map<String, Object> querymap) {
        return CourseDao.findList(querymap);
    }

    @Override
    public List<Course> findAll() {
        return CourseDao.findAll();
    }

    @Override
    public int findTotal(Map<String, Object> querymap) {
        return CourseDao.findTotal(querymap);
    }

    @Override
    public int UpdateCourseById(Course Course) {
        return CourseDao.UpdateCourseById(Course);
    }

    @Override
    public int delete(String ids) {
        return CourseDao.delete(ids);
    }

}
